$def with (d)

$var title: $_("Your Privacy on Open Library")

<div id="contentHead">
    <div class="small sansserif grey account-settings-menu">
      <a href="$ctx.user.key">$ctx.user.displayname</a>
      &raquo;
      <a href="$homepath()/account">$_("Settings")</a>
      &raquo; Privacy
    </div>
    <h1>$_("Privacy & Content Moderation Settings")</h1>
</div>

$def selected(value, value2):
    $if value == value2: checked="checked"

$ public_readlog = d.get('public_readlog', 'no')
$ safe_mode = d.get('safe_mode', 'no')

<div id="contentBody">
    <form method="post" class="olform" action="" id="privacy">

        <div class="formElement">
            <h3 class="collapse">$:_('Would you like to make your <a href="/account/books">Reading Log</a> public?')</h3>
            <p>$_("This will enable others to see what books you want to read, are reading, or have already read. Patrons with reading logs set to public may be followed.")</p>
        </div>
        <br/>
        <div class="formElement">
            <div class="input radio">
                <div class="sansserif larger">
                    <input type="radio" name="public_readlog" id="r0" value="yes" $selected(public_readlog, "yes")/>
                    <label for="u0">$_("Yes")</label>
                    <br/><br/>
                </div>
            </div>
            <div class="input radio">
                <div class="sansserif larger">
                    <input type="radio" name="public_readlog" id="r1" value="no" $selected(public_readlog, "no")/>
                    <label for="u1">$_("No")</label>
                    <br/><br/>
                </div>
            </div>
        </div>
        <div class="formElement">
            <h3 class="collapse">$_("Enable Safe Mode?")</h3>
            <p>$_("Safe Mode blurs book covers that have been flagged as having sensitive imagery.")</p>
        </div>
        <br/>
        <div class="formElement">
            <div class="input radio">
                <div class="sansserif larger">
                    <input type="radio" name="safe_mode" id="r2" value="yes" $selected(safe_mode, "yes")/>
                    <label for="u0">$_("Yes")</label>
                    <br/><br/>
                </div>
            </div>
            <div class="input radio">
                <div class="sansserif larger">
                    <input type="radio" name="safe_mode" id="r3" value="no" $selected(safe_mode, "no")/>
                    <label for="u1">$_("No")</label>
                    <br/><br/>
                </div>
            </div>
        </div>
        <div class="formElement bottom">
            <div class="input">
                <br/>
                <button type="submit" class="larger" name="save" title="$_('Save')">$_("Save")</button>
                &nbsp;
                <a href="javascript:;" class="smaller attn go-back-link">$_("Cancel")</a>
            </div>
        </div>
    </form>
</div>
